<?php

class DB {

	static $db;

	static function getConnection(){
		if(empty(self::$db)){
			self::$db = new PDO('mysql:host=localhost;dbname=usuario',
								'root',
								'',
								array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));
		}

		return self::$db;

	}

	static function getStatement($query){
		return self::getConnection()->prepare($query);
	}

}